package com.vito.oa.email.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.vito.oa.email.contact.dao.ExternalContactsMapper;
import com.vito.oa.email.contact.dao.OaBaseUserMapper;
import com.vito.oa.email.model.ExternalContacts;
import com.vito.oa.email.service.OaBaseUserService;

@Service
public class OaBaseUserServiceImpl implements OaBaseUserService {

	@Autowired
	private OaBaseUserMapper oaBaseUserMapper;
	
	@Autowired 
	ExternalContactsMapper contactsMapper;

	public String getUserPassword(String userId) {
		return oaBaseUserMapper.getUserPassword(userId);
	}

	public List<Map<String, String>> getInnerContactsTree(String dept) {
		return oaBaseUserMapper.getInnerContactsTree(dept);
	}

	public ExternalContacts getContactsByMail(ExternalContacts contacts) {
		return contactsMapper.getContactsByMail(contacts);
	}

	public int getUserMail(String email) {
		return oaBaseUserMapper.getUserMail(email);
	}

	public List<Map<String, String>> getAllUserEmail() {
		return oaBaseUserMapper.getAllUserEmail();
	}

	public Map<String, Object> getUserById(String userId) {
		return oaBaseUserMapper.getUserById(userId);
	}

}
